Component({
    properties: {
        datas: {
            type: null
        },
        component_id: {
            type: null
        }
    },
    data: {
        emptyImage: "https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/image.png",
        cubeWidth: 375,
        cubeHeight: 375,
        cudeSelecting: {
            start: null,
            end: null,
            data: []
        },
        cudeSelected: [],
        havePicture: !1,
        cubeX: 1,
        cubeItemWidth: "",
        cubeItemHeight: ""
    },
    lifetimes: {
        attached: function() {},
        moved: function() {},
        detached: function() {}
    },
    attached: function() {},
    ready: function() {
        this.checkhavePicture(), this.setData({
            cubeWidth: wx.getSystemInfoSync().windowWidth
        }), this.setData({
            cubeItemWidth: this.data.cubeWidth / this.data.datas.picture.density,
            cubeItemHeight: this.data.cubeWidth / this.data.datas.picture.density
        });
    },
    pageLifetimes: {
        show: function() {},
        hide: function() {},
        resize: function() {}
    },
    methods: {
        goimgurl: function(t) {
            var e = t.currentTarget.dataset.item.value;
            if (2 == e.is_minApp) if (e.gh_id) if (e.minApp_link) try {
                wx.navigateToMiniProgram({
                    appId: e.gh_id,
                    path: e.minApp_link,
                    extraData: {},
                    envVersion: "release",
                    success: function(t) {},
                    fail: function(t) {
                        wx.showToast({
                            title: "小程序跳转失败",
                            icon: "none",
                            duration: 2e3
                        });
                    }
                });
            } catch (t) {
                wx.showToast({
                    title: "小程序跳转失败",
                    icon: "none",
                    duration: 2e3
                });
            } else wx.showToast({
                title: "请设置跳转小程序后的跳转链接",
                icon: "none",
                duration: 2e3
            }); else wx.showToast({
                title: "请设置小程序所需跳转appId",
                icon: "none",
                duration: 2e3
            }); else {
                var a = e.h5_link, i = {
                    mid: wx.getStorageSync("yz_uid")
                };
                try {
                    a.indexOf("pages/live-player-plugin") > 0 && (a += "&open_share_ticket=1&custom_params=".concat(encodeURIComponent(JSON.stringify(i)))), 
                    wx.navigateTo({
                        url: a
                    });
                } catch (t) {
                    wx.showToast({
                        title: "链接设置错误",
                        icon: "none",
                        duration: 2e3
                    });
                }
            }
        },
        checkhavePicture: function() {
            if (this.data.datas.picture) {
                this.setData({
                    havePicture: !1,
                    cubeX: 1
                });
                for (var t = 0; t < this.data.datas.picture.cudeSelected.length; t++) this.data.datas.picture.cudeSelected[t].end.x > this.data.cubeX && this.setData({
                    cubeX: this.data.datas.picture.cudeSelected[t].end.x
                }), this.data.datas.picture.cudeSelected[t].value.image && this.setData({
                    havePicture: !0
                });
                0 !== this.data.datas.picture.cudeSelected.length && this.data.havePicture || this.setData({
                    cubeX: 4
                });
            }
        }
    }
});